﻿@model  KRM.Core.tblKRMTradeCustomer
<form action="/trade/saveaccountinfo" method="POST" style="margin:10px 0 0 0" id="fr-accountinfo">
    <input type="hidden" name="TradeAccNumber" id="TradeAccNumber" value="@Model.TradeAccNumber">
    <div class="row-fluid">@Html.Partial("Partial/_MessageResult")</div>
    <div class="row-fluid">
        <div class="span6">
            <div class="row-fluid">
                <div class="span4">Full Company Name:</div>
                <div class="span8">
                    <input type="text" class="input-block-level" name="FullCompanyName" id="FullCompanyName" value="@Model.FullCompanyName" required="required">
                </div>
            </div>
            <div class="row-fluid">
                <div class="span4">Trading Name:</div>
                <div class="span8">
                    <input type="text" class="input-block-level" name="TradingName" id="TradingName" value="@Model.TradingName" required="required">
                </div>
            </div>
            <div class="row-fluid">
                <div class="span4">Kybo Short Name:</div>
                <div class="span8">
                    <input type="text" class="input-block-level" name="TradeAccountName" id="TradeAccountName" value="@Model.TradeAccountName" required="required">
                </div>
            </div>
            <div class="row-fluid">
                <div class="span4">Customer Email Address:</div>
                <div class="span8">
                    <input type="text" class="input-block-level" name="EmailAddress" id="EmailAddress" value="@(Model.tblCustomer==null?"":Model.tblCustomer.EmailAddress)" required="required">
                </div>
            </div>
        </div>
                <div class="span6">
                    <div class="row-fluid">
                        <div class="span4">Account Status:</div>
                        <div class="span8">
                           <label><input type="checkbox" class="cbcheck" name="ActiveAccount" id="ActiveAccount" @(Model.ActiveAccount==true?"checked=checked":"") value="true">
                            Enabled</label> 
                        </div>
                    </div>

            <div class="row-fluid">
                <div class="span4"></div>
                <div class="span8">
                    <label><input type="checkbox" class="cbcheck" name="CanTakeOrder" id="CanTakeOrder"  @(Model.CanTakeOrder==true?"checked=checked":"") value="true">
                    Can Take Orders</label> 
                </div>
            </div>
            <div class="row-fluid">
                <div class="span4"></div>
                <div class="span8">
                    <label><input type="checkbox" class="cbcheck" name="HoldOrdersAsPending" id="HoldOrdersAsPending" @(Model.HoldOrdersAsPending==true?"checked=checked":"") value="true">Hold Orders As Pending</label> 
                </div>
            </div>
            <div class="row-fluid">
                <div class="span4"></div>
                <div class="span8">
                    <label><input type="checkbox" class="cbcheck" name="IsEDI" id="IsEDI"  @(Model.IsEDI==true?"checked=checked":"") value="true">
                    EDI</label> 
                </div>
            </div>
                </div>

    </div>
    <div class="row-fluid">
        <fieldset class="span12">
            <legend>Additional Details</legend>
            <div class="row-fluid">
                <div class="span6">
                    <div class="row-fluid">
                        <div class="span4">Nature of Business:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="NatureOfBusiness" id="NatureOfBusiness" value="@Model.NatureOfBusiness" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Company Reg No:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="CompnayRegistrationNumber" id="CompnayRegistrationNumber" value="@Model.CompnayRegistrationNumber" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">VAT Reg No:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="VatRegistrationNo" id="VatRegistrationNo" value="@Model.VatRegistrationNo" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Limited Company?:</div>
                        <div class="span8">
                            <label><input type="checkbox" class="cbcheck" name="LimitedCompany" id="LimitedCompany"  @(Model.LimitedCompany==true?"checked=checked":"") value="true">Limited</label>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Website:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="Website" id="Website" value="@Model.Website" required="required">
                        </div>
                    </div>
                </div>
                <div class="span6">
                    <div class="row-fluid">
                        <div class="span4">Year Est:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="YearEstablished" id="YearEstablished" value="@Model.YearEstablished" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">DUNS No:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="DUNSNubmer" id="DUNSNubmer" value="@Model.DUNSNubmer" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Language:</div>
                        <div class="span8">
                                                        @Html.DropDownList("LanguageId",null,new{@class="input-block-level" })

                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">No. Employees:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="NumberOfEmployees" id="NumberOfEmployees" value="@Model.NumberOfEmployees" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Invoice Code:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="InvoiceCode" id="InvoiceCode" value="@Model.InvoiceCode" required="required">
                        </div>
                    </div>
                </div>
            </div>

        </fieldset>
    </div>
    <div class="row-fluid">
        <fieldset class="span12">
            <legend>Accounts Details</legend>
            <div class="row-fluid">
                <div class="span6">
                    <div class="row-fluid">
                        <div class="span4">Currency:</div>
                        <div class="span8">
                                                        @Html.DropDownList("CurrencyId",null,new{@class="input-block-level" }) 

                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Payment Type:</div>
                        <div class="span8">
                            @Html.DropDownList("PaymentTypeId",null,new{@class="input-block-level" })

                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Supplier Code:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="SupplierCode" id="SupplierCode" value="@Model.SupplierCode" required="required">
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Credit Limit:</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="CreditLimit" id="CreditLimit" value="@Model.CreditLimit" required="required">
                        </div>
                    </div>
                </div>
                <div class="span6">
                    <div class="row-fluid">
                        <div class="span4">Credit Check:</div>
                        <div class="span8">
                            <div id="datetimepicker2" class="input-append input-block-level">
                                <input data-format="MM/dd/yyyy" type="text" name="LastCreditCheck" placeholder="From" value="@((Model.LastCreditCheck.Year>1900?Model.LastCreditCheck:DateTime.Now).ToString("MM/dd/yyyy"))" >
                                <span class="add-on">
                                    <i data-time-icon="icon-time" data-date-icon="icon-calendar" class="icon-calendar"></i>
                                </span>
                            </div>
                        </div>
                        <div class="row-fluid">
                            <div class="span4">Sales Ledger Code:</div>
                            <div class="span8">
                                <input type="text" class="input-block-level" name="SageSalesLedgerCode" id="SageSalesLedgerCode" value="@Model.SageSalesLedgerCode" required="required">
                            </div>
                        </div>
                        <div class="row-fluid">
                            <div class="span4">Vat Rate:</div>
                            <div class="span8">
                                <input type="text" class="input-block-level" name="VatRate" id="VatRate" value="@Model.VatRate" required="required">
                            </div>
                        </div>
                        <div class="row-fluid">
                            <div class="span4">Outstanding Balance:</div>
                            <div class="span8">
                                <input type="text" class="input-block-level" name="OutstandingBalance" id="OutstandingBalance" value="@Model.OutstandingBalance" required="required">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span2">Additional Details:</div>
                    <div class="span10">
                        <textarea  class="input-block-level" name="txtAdditionalDetails" id="txtAdditionalDetails" value="" required="required"></textarea>
                    </div>
                </div>
            </div>
        </fieldset>
    </div>
    <div class="row-fluid">
        <fieldset>
        <legend>Order Files</legend>
        <div class="row-fluid">
            <div class="span2">Store:</div>
            <div class="span4">
                @Html.DropDownList("StoreId",null,new{@class="input-block-level" })

            </div>
        </div>
        <div class="row-fluid">
                <label class="span2"><input class="cbcheck"type="radio" name="isManual" value="1" onchange="$('#divOrderTemplate').hide()"/>Manual</label>
                <label class="span4"><input class="cbcheck" type="radio" name="isManual"value="0" checked="checked"onchange="$('#divOrderTemplate').show()"/>Spreadsheet</label>
            <div class="span6" id ="divOrderTemplate">
                <div class="span4">Order Template:</div>
                <div class="span4">
                    @Html.DropDownList("TradeCustomersExcelDetailsID",null,new{@class="input-block-level" }) 
                </div>
                <div class="span4"><button type="button" class="btn btn-primary" id="EditSpreadsheetLayout">Edit Spreadsheet Layout</button></div>
            </div>
         </div>
        </fieldset>
    </div>
</form>​